import { ColumnButton } from "./ColumnButton"
import { POWERS } from "../../Consts";
export class RemoveButton {
  constructor(h, params, click, confirmTitle) {
    const { REMOVE } = POWERS;
    const text = REMOVE.text;
    const icon = REMOVE.icon;
    const title = confirmTitle || ''
    const props = {
      title,
      placement: "left",
      confirm: true,
      transfer: true
    };
    const on = {
      "on-ok": () => { click && click(params.row.id); }
    };
    return h("Poptip", { props, on }, [
      new ColumnButton(h, text, icon).build()
    ]);
  }
}
